﻿@model Lehnet.Models.Personel
<html>
<head>
    <script type="text/javascript" src="/Scripts/jquery-1.4.4.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.unobtrusive-ajax.js"></script>
    <script>
        function CloseAndUpdate() {
            parent.getAllPersonelAjax();
            parent.jQuery.fancybox.close();
        }
        function OnSuccess(result, status, xhr)
        {
            CloseAndUpdate();
        }
    </script>

</head>
<body>

    <div style="width: 100%; text-align: right;">
        <a href="#" title="Kapat" onclick="CloseAndUpdate()">
            <input type="button" value="Kapat" /></a>
    </div>
    @using (Ajax.BeginForm("Create", new AjaxOptions { OnSuccess = "OnSuccess", HttpMethod = "Post" }))
    {
        @Html.HiddenFor(model => model.Id)
        <fieldset>
            <legend>Personel Tanımlama</legend>
            <table width="100%">
                <tr>
                    <td>Ad Soyad</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Ad)</td>

                    <td></td>

                    <td>Soyad</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Soyad)</td>
                </tr>
                <tr>
                    <td>EMail</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Email)</td>

                    <td></td>

                    <td>Kullanıcı Adı</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.KullaniciAdi)</td>
                </tr>
                <tr>
                    <td>Şifre</td>
                    <td>:</td>
                    <td>@Html.EditorFor(model => model.Sifre)</td>

                    <td></td>

                    <td>Aktif mi?</td>
                    <td>:</td>
                    <td>@Html.CheckBoxFor(model => model.Aktif)</td>
                </tr>
                <tr>
                    <td colspan="6">
                        <input type="submit" value="Kaydet" /></td>
                </tr>
            </table>
        </fieldset>
    }
</body>

</html>
